package com.pushtalk.exception;

import java.io.PrintStream;
import java.io.PrintWriter;

public class PushRejectionException extends Exception {
    private static final long serialVersionUID = 1L;

    private Throwable nestedThrowable = null;
 
    private String rejectionMessage;

    public PushRejectionException() {
        super();
    }

    public PushRejectionException(String msg) {
        super(msg);
    }

    public PushRejectionException(Throwable nestedThrowable) {
        this.nestedThrowable = nestedThrowable;
    }

    public PushRejectionException(String msg, Throwable nestedThrowable) {
        super(msg);
        this.nestedThrowable = nestedThrowable;
    }

    @Override
	public void printStackTrace() {
        super.printStackTrace();
        if (nestedThrowable != null) {
            nestedThrowable.printStackTrace();
        }
    }

    @Override
	public void printStackTrace(PrintStream ps) {
        super.printStackTrace(ps);
        if (nestedThrowable != null) {
            nestedThrowable.printStackTrace(ps);
        }
    }

    @Override
	public void printStackTrace(PrintWriter pw) {
        super.printStackTrace(pw);
        if (nestedThrowable != null) {
            nestedThrowable.printStackTrace(pw);
        }
    }

 
    public String getRejectionMessage() {
        return rejectionMessage;
    }
 
    public void setRejectionMessage(String rejectionMessage) {
        this.rejectionMessage = rejectionMessage;
    }
}
